feat: 新增 MediaPlayPause HotkeyTrigger 支持有线耳机线控录音 (#477)#568
Merged
H-Chris233 merged 1 commit intoJun 1, 2026
Conversation
- 枚举新增 MediaPlayPause 变体,与 RightControl 等并列 - Windows WH_KEYBOARD_LL 钩子捕获 VK_MEDIA_PLAY_PAUSE (0xB3) - macOS/Linux 标记为 unreachable (Windows-only) - 前端类型、i18n 翻译支持 - 配置迁移保护:Linux fcitx 函数添加 MediaPlayPause 守卫 Closes Open-Less#477
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Closes #477
改动
在 HotkeyTrigger 枚举中新增 MediaPlayPause 变体,Windows WH_KEYBOARD_LL 钩子捕获 VK_MEDIA_PLAY_PAUSE(0xB3),使 EarPods 线控按钮可作为录音触发键。
Rust 后端
前端
验证
平台
PR Type
Enhancement
Description
Add MediaPlayPause variant to HotkeyTrigger enum
Capture VK_MEDIA_PLAY_PAUSE (0xB3) on Windows via WH_KEYBOARD_LL
Frontend: extend types and i18n translations
Guards in Linux fcitx sync to avoid panic on Windows-only trigger
Diagram Walkthrough
flowchart LR MediaKey[EarPods Play/Pause Button] --> WH_KEYBOARD_LL[Windows Low Level Hook] WH_KEYBOARD_LL --> Trigger[HotkeyTrigger::MediaPlayPause] Trigger --> Recording[Toggle / Hold / DoubleClick Recording]File Walkthrough
1 files
Skip window key fallback for MediaPlayPause5 files
Map MediaPlayPause to VK_MEDIA_PLAY_PAUSE on WindowsMap legacy trigger strings and primary for MediaPlayPauseAdd MediaPlayPause variant and display nameHandle MediaPlayPause in legacy trigger and formattingAdd mediaPlayPause to HotkeyTrigger union type1 files
Add guards for MediaPlayPause in fcitx sync functions5 files
Add MediaPlayPause translation for EnglishAdd MediaPlayPause translation for JapaneseAdd MediaPlayPause translation for KoreanAdd MediaPlayPause translation for Simplified ChineseAdd MediaPlayPause translation for Traditional Chinese